/**
 * Automatic Subtitle Downloader
 * http://code.google.com/p/autosubdown/
 * 
 * Copyright 2010-2011 Raphael Medeiros.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 */
package com.byraphaelmedeiros.autosubdown.domain;

/**
 * @author Raphael Medeiros
 *
 */
public class SiteProvider {
	
	private long id;

	private Provider provider;
	
	private String urlLogin;
	
	private String urlLoginAction;
	
	private String username;
	
	private String pasword;
	
	public SiteProvider() {
	}
	
	public SiteProvider(long id) {
		this.id = id;
	}
	
	public SiteProvider(long id, Provider provider, String urlLogin, String urlLoginAction, String username, String password) {
		this.id = id;
		this.provider = provider;
		this.urlLogin = urlLogin;
		this.urlLoginAction = urlLoginAction;
		this.username = username;
		this.pasword = password;
	}

	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}

	/**
	 * @return the provider
	 */
	public Provider getProvider() {
		return provider;
	}

	/**
	 * @param provider the provider to set
	 */
	public void setProvider(Provider provider) {
		this.provider = provider;
	}

	/**
	 * @return the urlLogin
	 */
	public String getUrlLogin() {
		return urlLogin;
	}

	/**
	 * @param urlLogin the urlLogin to set
	 */
	public void setUrlLogin(String urlLogin) {
		this.urlLogin = urlLogin;
	}

	/**
	 * @return the urlLoginAction
	 */
	public String getUrlLoginAction() {
		return urlLoginAction;
	}

	/**
	 * @param urlLoginAction the urlLoginAction to set
	 */
	public void setUrlLoginAction(String urlLoginAction) {
		this.urlLoginAction = urlLoginAction;
	}

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the pasword
	 */
	public String getPasword() {
		return pasword;
	}

	/**
	 * @param pasword the pasword to set
	 */
	public void setPasword(String pasword) {
		this.pasword = pasword;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SiteProvider other = (SiteProvider) obj;
		if (id != other.id)
			return false;
		return true;
	}
}